/*
 * @Author: Sam
 * @Date: 2020-11-10 20:50:40
 * @LastEditTime: 2021-09-22 19:10:53
 * @LastEditors: Sam
 * @Description:
 * @FilePath: \resourcesf:\thework\tofba-client\src\api\amazon.js
 * @可以输入预定的版权声明、个性签名、空行等
 */
import request from '@/utils/request'

// 初始化
export function initData (data) {
  return request({
    url: '/seaair/amazon/inbound/init',
    method: 'post'
    // data
  })
}

// 查询发件人
export function queryShipFrom (data) {
  return request({
    url: '/seaair/amazon/inbound/queryShipFrom',
    method: 'post'
    // data
  })
}

// 创建发件人
export function createShipFrom (data) {
  return request({
    url: '/seaair/amazon/inbound/createShipFrom',
    method: 'post',
    data
  })
}

// SKU搜索
export function fuzzyQuerySku (data) {
  return request({
    url: '/seaair/amazon/inbound/fuzzyQuerySku',
    method: 'post',
    data
  })
}

// 创建发货计划
export function createShipmentPlan (data) {
  return request({
    url: '/seaair/amazon/inbound/createShipmentPlan',
    method: 'post',
    data
  })
}

// 保存箱单
export function createPackList (data) {
  return request({
    url: '/seaair/amazon/inbound/createPackList',
    method: 'post',
    data
  })
}

// 加载创建箱单页面
export function toCreatePackList (data) {
  return request({
    url: '/seaair/amazon/inbound/toCreatePackList',
    method: 'post',
    data
  })
}

// 发货计划列表
export function planList (data) {
  return request({
    url: '/seaair/amazon/inbound/shipment/plan/list',
    method: 'post',
    data
  })
}

// 发货计划列表-初始化
export function planInit (data) {
  return request({
    url: '/seaair/amazon/inbound/shipment/plan/init',
    method: 'post'
    // data
  })
}

// 根据ID查找
export function planFindById (data) {
  return request({
    url: '/seaair/amazon/inbound/shipment/plan/findById',
    method: 'post',
    params: data
  })
}

// 数量
export function planCount (data) {
  return request({
    url: '/seaair/amazon/inbound/shipment/plan/count',
    method: 'post',
    data
  })
}

// 手动确认计划
export function manualCreateInboundShipment (data) {
  return request({
    url: '/seaair/amazon/inbound/manualCreateInboundShipment',
    method: 'post',
    data
  })
}

// 手动获取补料结果
export function manualGetFeed (data) {
  return request({
    url: '/seaair/amazon/inbound/manualGetFeed',
    method: 'post',
    data
  })
}

// 手动执行补料流程
export function manualSubmitFeed (data) {
  return request({
    url: '/seaair/amazon/inbound/manualSubmitFeed',
    method: 'post',
    data
  })
}

// 手动上传承运人信息
export function manualPutTransportDetails (data) {
  return request({
    url: '/seaair/amazon/inbound/manualPutTransportDetails',
    method: 'post',
    data
  })
}

// 查看承运人信息
export function getTransportDetails (data) {
  return request({
    url: '/seaair/amazon/inbound/getTransportDetails',
    method: 'post',
    data
  })
}

// 确认装箱单
export function confirmPackList (data) {
  return request({
    url: '/seaair/amazon/inbound/confirmPackList',
    method: 'post',
    data
  })
}

// 确认发货
export function shipped (data) {
  return request({
    url: '/seaair/amazon/inbound/shipped  ',
    method: 'post',
    data
  })
}

// 取消发货
export function voidTransportDetails (data) {
  return request({
    url: '/seaair/amazon/inbound/voidTransportDetails  ',
    method: 'post',
    data
  })
}

// 获取面单
export function manualGetLabels (data) {
  return request({
    url: '/seaair/amazon/inbound/manualGetLabels',
    method: 'post',
    data
  })
}

// 下单
export function createFbaOrder (data) {
  return request({
    url: '/seaair/amazon/inbound/createFbaOrder',
    method: 'post',
    data
  })
}
